package com.inspur_video.inspur_video.dao;

import com.inspur_video.inspur_video.bean.History;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @author 小浩
 * @date 2018-07-25 17:21
 * @package com.inspur_video.inr_video.dao
 * @description
 */
public interface HistoryDao extends JpaRepository<History,Integer> {
    List<History> findByUIdOrderByWatchTime(int id);

//    @Query("SELECT coverurl,v_title,v_describe,histories.a_id,watch_time FROM histories,videos WHERE u_id=:id AND histories.a_id=videos.a_id")
//    List<HistoryInfo> getUserHistory(int id);
}
